<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
<a href="{:U('a')}" class="js-news">新闻</a>
</body>
<script type="text/javascript" charset="utf-8">
//    var locationHref = location.href;
//    document.addEventListener("click", function (event) {
//        history.replaceState("首页","",locationHref );
//    });
window.onload = function(){
    //alert(11);
    //alert(history.state);
    window.addEventListener("popstate", function (e) {
        alert(11);
        alert(history.state);
    });
}

</script>
</html>